const api = 'https://bci.renjiwulian.com'
const PI = 5
const PR = 3
const assistant = 4
const student = 2
const stranger = 1

const TaskWaitForCheck = 1
const ProjectWaitForCheck = 2
const Run = 3
const Finished = 4

const GainWaitForCheck = 1
const GainNo = 3
const GainYes = 2

export default {
  url: api,
  getUrlKey: function (name) {
    return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [,""])[1].replace(/\+/g, '%20')) || null
  },
  PI: PI,
  PR: PR,
  assistant: assistant,
  student: student,
  stranger: stranger,

  GainWaitForCheck: GainWaitForCheck,
  GainYes: GainYes,
  GainNo: GainNo,
  TaskWaitForCheck: TaskWaitForCheck,
  ProjectWaitForCheck: ProjectWaitForCheck,
  Run: Run,
  Finished: Finished
}
